<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	response.setCharacterEncoding("UTF-8");
	response.setContentType("text/xml");
	response.setHeader("Cache-Control","no-cache"); 
	response.setHeader("Pragma","no-cache"); 
%>
<menu>
	<!-- id , text就是menu的名 , disable为true就不可用 , action用于绑定js事件 -->
	<item id="c" text="查看详情信息" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoLookContract.action?id=${id}',520,350);" />
	<si:role url="/contract/contractAction!gotoSignContract.action">
		<s:if test="form.isSign==0&&form.createMan==#session.user.userId">
			<item id="c" text="签合同" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoSignContract.action?id=${id}',400,150);" />
		</s:if>
		<s:else>
			<item id="c" text="签合同" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoSignContract.action?id=${id}',400,150);" disable="false"/>
		</s:else>
	</si:role>
	<s:if test="form.isStockUp==0&&form.createMan==#session.user.userId">
		<si:role url="/goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action">
			<item id="c" text="备货" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action?id=${id}&amp;form.orderType=1',750,500);" />
		</si:role>
	</s:if>
	<s:else>
		<si:role url="/goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action">
			<item id="c" text="备货" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action?id=${id}&amp;form.orderType=1',750,500);" disable="false" />
		</si:role>
		<item id="c" text="查看备货单" action="window.open('<%=basePath %>goodsOrder/goodsOrderAction!gotoLookGoodsOrder.action?id=${id}&amp;condition.orderType=1');" />
	</s:else>
	
	<s:if test="form.isDelivery==0&&form.createMan==#session.user.userId">
		<si:role url="/goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action">
			<item id="c" text="发货" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action?id=${id}&amp;form.orderType=2',650,450);"/>
		</si:role>
	</s:if>
	<s:else>
		<si:role url="/goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action">
			<item id="c" text="发货" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>goodsOrder/goodsOrderAction!gotoAddGoodsOrder.action?id=${id}&amp;form.orderType=2',650,450);" disable="false"/>
		</si:role>
		<item id="c" text="查看发货单" action="window.open('<%=basePath %>goodsOrder/goodsOrderAction!gotoLookGoodsOrder.action?id=${id}&amp;condition.orderType=2');" />
	</s:else>
	<si:role url="/contract/contractAction!gotoInvoiceContract.action">
		<s:if test="form.isInvoice==0&&form.createMan==#session.user.userId">
			<item id="c" text="开发票" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoInvoiceContract.action?id=${id}',400,150);"/>
		</s:if>
		<s:else>
			<item id="c" text="开发票" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoInvoiceContract.action?id=${id}',400,150);" disable="false"/>
		</s:else>
	</si:role>
	<si:role url="/contract/contractAction!gotoBackMoneyContract.action">
		<s:if test="form.remitMoney<=0&&form.remitMoney!=form.contractMoney&&form.createMan==#session.user.userId">
			<item id="c" text="回款" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoBackMoneyContract.action?id=${id}', 400,150);"/>
		</s:if>
		<s:else>
			<item id="c" text="回款" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoBackMoneyContract.action?id=${id}', 400,150);" disable="false"/>
		</s:else>
	</si:role>
	<item id="e" text="-"/>
	<si:role url="/contract/contractAction!gotoEditContract.action">
		<s:if test="form.isInvoice==0&&form.createMan==#session.user.userId">
			<item id="c" text="添加产品" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath%>contractProductDetail/contractProductDetailAction!gotoEditContractProductDetail.action?form.contractId=${id}',500,350);"/>
			<item id="c" text="查看产品明细" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>contractProductDetail/contractProductDetailAction!listContractProductDetailByContractId.action?condition.contractId=${id}',800,350);"/>
		</s:if>
		<s:else>
			<item id="c" text="添加产品" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath%>contractProductDetail/contractProductDetailAction!gotoEditContractProductDetail.action?form.contractId=${id}',500,350);" disable="false"/>
			<item id="c" text="查看产品明细" action="showDialog('鼎烜电力集团网络办公平台','<%=basePath %>contractProductDetail/contractProductDetailAction!listContractProductDetailByContractId.action?condition.contractId=${id}',800,350);" disable="false"/>
		</s:else>
	</si:role>
	<s:if test="form.isStockUp==0&&form.createMan==#session.user.userId">
		<si:role url="/contract/contractAction!gotoEditContract.action">
			<item id="c" text="编辑" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoEditContract.action?id=${id}',500,420);"/>
		</si:role>
		<si:role url="/contract/contractAction!gotoDeleteContract.action">
			<item id="a" text="删除" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoDeleteContract.action?id=${id}', 400,150);" />
		</si:role>
	</s:if>
	<s:else>
		<si:role url="/contract/contractAction!gotoEditContract.action">
			<item id="c" text="编辑" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoEditContract.action?id=${id}',500,420);" disable="false"/>
		</si:role>
		<si:role url="/contract/contractAction!gotoDeleteContract.action">
			<item id="a" text="删除" action="showDialog('鼎烜电力集团网络办公平台','contractAction!gotoDeleteContract.action?id=${id}', 400,150);" disable="false"/>
		</si:role>
	</s:else>
</menu>  
